/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package rg1threaddemo;

/**
 *
 * @author apple
 */
public class MyThread extends Thread
{
    private int count;

    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        while(true)
        {
            System.out.println(Thread.currentThread().getName()+":"+count);
            count++;
            if(count==10000) return;
        }
    }
    
    
}
